package com.vacation.vacationdemo.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 杨光
 * @date 2022年03月12日 17:21
 */
@ControllerAdvice
public class GlobalExcceptionHandler {

    @ExceptionHandler(Exception.class)
    public String exceptionHandler(Exception e){
        return "Error";
    }
}
